package edu.regiscollege.cs312.scheduler;

/** Object representing a Job that Scheduler can process.
 * 
 */
public class Job {
    private final String name;
    private long arrivalTime;
    private final long completionTime;
    private long remainingTime;
    
    public Job(String name, long completionTime) {
            this.name = name;
            this.completionTime = completionTime;
            this.remainingTime = completionTime;
    }
    
    @Override
    public String toString() {
            StringBuffer sb = new StringBuffer();
            sb.append(String.format("Name: %s\n", name));
            sb.append(String.format("Arrival: %d\n", arrivalTime));
            sb.append(String.format("Completion: %s\n", completionTime));
            sb.append(String.format("Remaining: %s\n", remainingTime));
            
            return sb.toString();
    }

    public String getName() {
            return name;
    }
    
    public long getCompletionTime() {
            return completionTime;
    }

    public void setArrivalTime(long time) {
            arrivalTime = time;
    }
    
    public long getArrivalTime() {
            return arrivalTime;
    }
    
    public void setRemainingTime(long time) {
            remainingTime = time;
    }
    
    public long getRemainingTime() {
            return remainingTime;
    }
}
